﻿<Router AppAssembly="@typeof(Main).Assembly" AdditionalAssemblies="@moduleContext.ModeuleAssemblies">
    <Found Context="routeData">
        <AuthorizeReuseTabsRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
            <Authorizing>
                @(LocalizerUtil.GetValue("Authorizing") + "...")
            </Authorizing>
            <NotAuthorized>
                <Gardener.Client.Base.Shared.RedirectToLogin />
            </NotAuthorized>
        </AuthorizeReuseTabsRouteView>
    </Found>
    <NotFound>
        <CascadingAuthenticationState>
            <LayoutView Layout="@typeof(Gardener.Client.Base.Shared.OtherPageLayout)">
                <Result Status="404"
                        Title="404"
                        SubTitle="@(LocalizerUtil.GetValue("Page404Message"))">
                </Result>
                <div style="width:100%;text-align:center;">
                    <Button OnClick="e=>GoHome()">@LocalizerUtil.GetValue("GoHome")</Button>
                </div>
            </LayoutView>
        </CascadingAuthenticationState>
    </NotFound>
</Router>